# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=kibi
pkgver=0.2.2
pkgrel=4
pkgdesc="Text editor in ≤1024 lines of code, written in Rust"
url="https://github.com/ilai-deutel/kibi"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le"  # limited by rust/cargo
license="( Apache-2.0 OR MIT ) AND BSD-2-Clause"
makedepends="cargo cargo-auditable"
source="https://github.com/ilai-deutel/kibi/archive/v$pkgver/$pkgname-$pkgver.tar.gz
	getrandom-0.2.10.patch
	"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/kibi -t "$pkgdir"/usr/bin/
}

sha512sums="
da618363e38208140ec793c11a220ba32021683dd8e26874c0910f1194d9bdf9e7b5cda79ef29190944743abe31f18e8eed969b3f5466d1b82a31e09b2c7c225  kibi-0.2.2.tar.gz
98f451e2b039c69a7fd69107fccc600c1fdc470891c54c2b32060d838eb3c0d51075d0480c9aa4bdbd72bf30ebc8d76542deca8597e25b9476acb7fc93b59f67  getrandom-0.2.10.patch
"
